<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <script src=" Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
	<script src=" Scripts/jquery-ui-1.8.custom.min.js" type="text/javascript"></script>
    <title>公司请假管理系统</title>
    <style type="text/css">
	<!--
	body {
		margin-left: 0px;
		margin-top: 0px;
		margin-right: 0px;
		margin-bottom: 0px;
		overflow:hidden;
	}
	.STYLE3 {font-size: 12px; color: #adc9d9; }
	-->
	</style>
    <script type="text/javascript">
    	function submitVerify(){
    		var userName = $("#textfield").val();
    		var userPwd = $("#textfield2").val();
    		$.post("verifyUser.action",{"userName":userName, "userPwd":userPwd}, function(data){
    			if(data == "0"){
    				alert("用户名或密码错误！");
    			}
    			if(data == "1"){
    				alert("用户验证成功。请先激活邮箱方能正常登录！");
    			}
    			if(data == "2"){
    				location = "toMain.action";
    			}
    		});
    	}
    </script>
  </head>
  <body>
<form action=""  method="post">
<table width="100%"  height="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td bgcolor="#1075b1">&nbsp;</td>
  </tr>
  <tr>
    <td height="608" background="images/login_03.gif"><table width="847" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="264" background="images/login_04.gif" align="center">&nbsp;<h1>公司请假管理系统</h1></td>
      </tr>
      <tr>
        <td height="84"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="381" height="84" background="images/login_06.gif">&nbsp;</td>
            <td width="162" valign="middle" background="images/login_07.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="44" height="30" align="left" valign="middle"><div align="right"><span class="STYLE3">用户</span></div></td>
                <td width="10" height="30" align="left" valign="middle">&nbsp;</td>
                <td width="114" height="30" align="left" valign="middle">
                  <div align="left">
                    <input type="text" name="userName" id="textfield" style="width:100px; height:17px; background-color:#87adbf; border:solid 1px #153966; font-size:12px; color:#283439; ">
                  </div></td>
              </tr>
              <tr>
                <td height="30" align="left" valign="middle"><div align="right"><span class="STYLE3">密码</span></div></td>
                <td width="10" height="30" align="left" valign="middle">&nbsp;</td>
                <td height="30" align="left" valign="middle"><input type="password" name="userPwd" id="textfield2" style="width:100px; height:17px; background-color:#87adbf; border:solid 1px #153966; font-size:12px; color:#283439; "></td>
              </tr>
            </table></td>
            <td width="26"><img src="images/login_08.gif" width="26" height="84"></td>
            <td width="67" background="images/login_09.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            
              <tr>
                <td height="25"><div align="center"><img onclick="submitVerify();" src="images/dl.gif" width="57" height="20"></div></td>
              </tr>
              <tr>
                <td height="25">
                </td>
              </tr>
            </table></td>
            <td width="211" background="images/login_10.gif">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="206" background="images/login_11.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td bgcolor="#152753">&nbsp;</td>
  </tr>
</table>
</form>
</body>
</html>
